package cn.util;

import cn.hutool.core.util.RandomUtil;

public class RandomJugement {

    /**
     * 概率判断
     *
     * @param chance 百分比 0.5
     * @return 结果
     */
    public static boolean juge(double chance) {
        double v = RandomUtil.randomDouble(10001);
        return v <= chance * 10000;
    }

}
